Skip to main content

ARDK for Android/com.nianticlabs.ardk/ARDKSession

ARDKSession

class ARDKSession : Closeable

Creates a new ARDK instance with the provided API key.

This is the primary entry point for initializing ARDK functionality. You must call this before using any other ARDK features.

Parameters​

androidJvm

apiKeyYour Niantic API key for authentication. Get this from the Niantic developer portal.

Throws​

IllegalStateExceptionif native libraries failed to load

Constructors​

ARDKSession[androidJvm]
constructor(apiKey: String, useLidar: Boolean = true, pathConfig: PathConfig? = null, logCallback: ArdkLogCallback? = null)constructor(accessToken: String, refreshToken: String, useLidar: Boolean = true, pathConfig: PathConfig? = null, logCallback: ArdkLogCallback? = null)
Convenience constructor to initialize ARDK with auth tokens instead of an API key. Tokens will be forwarded to native for validation and persistence.
constructor(configFilePath: String, logCallback: ArdkLogCallback? = null)
Creates a new ARDK instance from a JSON configuration file. Throws IllegalStateException if initialization fails.
constructor(config: ArdkConfiguration.Configuration, pathConfig: PathConfig? = null)
Creates a new ARDK instance from a programmatic configuration object. Throws IllegalStateException if initialization fails.

Properties​

NameSummary
depthSession[androidJvm]
lateinit var depthSession: DepthSession
mapping[androidJvm]
lateinit var mapping: DeviceMappingSession
mapStore[androidJvm]
lateinit var mapStore: MappingStorageSession
meshDownload[androidJvm]
lateinit var meshDownload: MeshDownloaderSession
meshingSession[androidJvm]
lateinit var meshingSession: MeshingSession
objectDetection[androidJvm]
lateinit var objectDetection: ObjectDetectionSession
recordingExporter[androidJvm]
lateinit var recordingExporter: RecordingExporter
scanning[androidJvm]
lateinit var scanning: ScanningSession
semantics[androidJvm]
lateinit var semantics: SemanticsSession
vps[androidJvm]
lateinit var vps: VPSSession
vpsCoverage[androidJvm]
lateinit var vpsCoverage: VPSCoverageSession
wps[androidJvm]
lateinit var wps: WPSSession

Functions​

NameSummary
close[androidJvm]
open override fun close()
Destroys an ARDK instance and any remaining opened feature sessions and frees associated resources.
getRequestedDataFormats[androidJvm]
fun getRequestedDataFormats(): Int
Gets the data formats that ARDK requires for processing.
getVersion[androidJvm]
fun getVersion(): String
Returns the ARDK version string from the native library.
sendFrame[androidJvm]
fun sendFrame(frameData: FrameData)
setAccessToken[androidJvm]
fun setAccessToken(token: String)
Set the access token at runtime. Invalid/empty tokens are ignored by native.
setRefreshToken[androidJvm]
fun setRefreshToken(token: String)
Set the refresh token at runtime. Invalid/empty tokens are ignored by native.